using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;

namespace VirtualKeyboards
{
    internal static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Mutex instance = new Mutex(true, "VirtualKeyboard", out bool createdNew);
            if (createdNew)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new VirtualKeyboard());
                instance.ReleaseMutex();
            }
            else
            {
                System.Environment.Exit(0);
                //Application.ExitThread();
                //Application.Exit();
            }

        }
    }
}
